<?php
/**
 * The template for fetching single post.
 *
 * @package Behold
 * @since Behold 1.0.0
 */
?>

<div class="eachpost group">
	
	<div id="post-<?php the_ID(); ?>" <?php post_class('blgcontent group ');?>>
	<div class="entry-header group">
		<?php
			$behold_post_format = get_post_format();
			if ( false === $behold_post_format )
			$behold_post_format = 'standard';
		?>
		
		<?php if ( is_sticky() ) :
			# style changes slightly. thats it.
		endif; ?>
		
		<h1 class="entry-title format-<?php echo $behold_post_format;?>">
			<?php if ( is_singular() ):
				// single post title should NOT display a phyperlink to itself as per standards.
				the_title();
			else : ?>
				<a class="entry-title-link" href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'Behold' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
			<?php endif; ?>
			<?php edit_post_link('', '', ''); # We display only a "edit image". So, no edit-post, or any such text. ?> 
		</h1>
		<?php
			if( "page" == get_post_type() ):
				behold_get_post_comments();
			endif;
		?>		
	</div>
		<?php 
		if ( is_search() ) :
			the_excerpt();
		else :
			the_content(); 
		endif;
		?>
		<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'Behold' ) . '</span>', 'after' => '</div>' ) ); ?>
	</div>
	<?php if( "page" != get_post_type() ): ?>
	<div class="post-meta">
	<div class="m-arrow" ></div>
	
			<div class="publish-time-with-author">															
				<?php behold_posted_at_with_author(); ?>			
			</div>			
			<div class="post-meta-cat">
				<?php behold_get_post_categories();?>
			</div>
			<div class="post-meta-tag">
				<?php behold_get_post_tags();?>
			</div>
		
			<?php if ( comments_open() && ! post_password_required() ) : ?>
			<div class="post-footer group">
				<div class="post-meta-comments">
					<?php 
						behold_get_post_comments();
					?>
				</div>
			</div>
			<?php endif;?>
	</div>	
	<?php endif;?>
	
</div>
